package com.example.broadcastreceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;


// Android 8.0后限制静态注册
public class AirplaneReceiver extends BroadcastReceiver {

    // 模拟器必须冷启动才能接收到
    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, "切换飞行模式", Toast.LENGTH_SHORT).show();
    }
}
